import request from '@/utils/request'

// 查询停机记录列表
export function listDowntime(query) {
  return request({
    url: '/gelly/downtime/list',
    method: 'get',
    params: query
  })
}

// 查询停机记录详细
export function getDowntime(latheId) {
  return request({
    url: '/gelly/downtime/' + latheId,
    method: 'get'
  })
}

// 新增停机记录
export function addDowntime(data) {
  return request({
    url: '/gelly/downtime',
    method: 'post',
    data: data
  })
}

// 修改停机记录
export function updateDowntime(data) {
  return request({
    url: '/gelly/downtime',
    method: 'put',
    data: data
  })
}

// 删除停机记录
export function delDowntime(latheId) {
  return request({
    url: '/gelly/downtime/' + latheId,
    method: 'delete'
  })
}
